#include <chrono>
#include <functional>
#include <iostream>
#include <thread>

struct thread_t {
  void display() {
    value_ = 10;
    std::this_thread::sleep_for(std::chrono::seconds(5));
    std::cout << value_ << "\n";
  }

 public:
  int value_;
};

int main(int argc, char const* argv[]) {
  thread_t p0;
  std::thread th0(&thread_t::display, p0);
  std::cout << "have start\n";
  std::this_thread::sleep_for(std::chrono::seconds(10));

  // p0.value_ = 9;
  // th0.join();

  // std::thread th1(std::bind(std::mem_fn(&thread_t::display), &p0, 230));
  // th1.join();
  /* code */
  return 0;
}
